#if !defined(AFX_PARTRODVIEW_H__961699AB_A2BA_43D1_8C82_3767D55D0FCC__INCLUDED_)
#define AFX_PARTRODVIEW_H__961699AB_A2BA_43D1_8C82_3767D55D0FCC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PartRodView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CPartRodView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "PartRod.h"
#include "PHSSHARERES.h"
#include "FormViewEx.h"

class CPartRodView : public CFormViewEx
{
protected:
	CPartRodView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CPartRodView)

public:
	void LinkToObject(PartRod* pRod){
		m_pObject = pRod;
	}

// Form Data
public:
	//{{AFX_DATA(CPartRodView)
	enum { IDD = IDD_PART_ROD };
	CString	m_strCustomID;
	CString	m_strDia;
	CString	m_strMaterial;
	CString	m_strName;
	CString	m_strSpec;
	CString	m_strBottomInsert;
	CString	m_strLength;
	CString	m_strLoad;
	CString	m_strTemperature;
	CString	m_strTopInsert;
	CString	m_strWeight;
	CString	m_strUnitWeight;
	CString	m_strClgg;
	//}}AFX_DATA
	
private:
	void UpdateObjectData();
	void LoadMaterial();
	void LoadDia();
	void LoadBH();
	void LoadSpec();
	void LoadOthers();
//	BOOL IsNumber(const CString& str);

private:
	PartRod* m_pObject;
	PartRod* m_pPart;
	BOOL m_bIsFirstVisible;
	
// Attributes
public:
	CString m_strRodTable;
	CString m_strObservation;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPartRodView)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CPartRodView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CPartRodView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSelchangeSpecCombo();
	afx_msg void OnSelchangeMaterialCombo();
	afx_msg void OnChangeLoadEdit();
	afx_msg void OnSelchangeDiaCombo();
	afx_msg void OnChangeTemperatureEdit();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnChangeLengthEdit();
	afx_msg void OnDestroy();
	afx_msg void OnChangeUnitweightEdit();
	afx_msg void OnKillfocusLengthEdit();
	afx_msg void OnKillfocusTopinsertEdit();
	afx_msg void OnKillfocusBottominsertEdit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PARTRODVIEW_H__961699AB_A2BA_43D1_8C82_3767D55D0FCC__INCLUDED_)
